<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>My JSP 'SurveyAudi.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/Css/Admin.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/Css/bootstrap.min.css">
    <script language="JavaScript" src="${pageContext.request.contextPath}/Js/Func.js"></script>
    <script language="javascript">window.onload = tableFix;</script>
    <script type="text/javascript">
        function DelSurvey(sid) {
            if (confirm("确定要删除这个问卷吗？") == true)
                window.location = "surveyManage/delSurvey.do?op=DelSurvey&sid=" + sid;
        }
    </script>

</head>
<body>
<div class=nav><a href=admin_main.jsp>桌面</a>»问卷列表
</div>
<table class=table cellspacing="0" cellpadding="0" align="center">

    <tbody>
    <tr>
        <th width=7%>编号</th>
        <th width=20%>问卷名称</th>
        <th width=15%>发起者 <br></th>
        <th>创建时间 <br></th>
        <th>结束日期<br></th>
        <th width=7%>审核 <br></th>
        <th>操作 <br></th>
    </tr>
    </tbody>
    <tbody>
        <c:forEach items="${pageBean.list}" var="survey">
            <tr>
                <td>${survey.id}</td>
                <td>${survey.name}</td>
                <td>${survey.author}</td>
                <td>${survey.createdate}</td>
                <td>${survey.endtime}</td>
                    <%--如果是已经审核就是√,没有审核就是×--%>
                    <%--<td>${clazz.getSIsAudited} ? "<img src='images/on.gif'>" : "<img src='images/off.gif'>"</td>--%>
                    <%--<%=survey.getSIsAudited()?"<span title='为了保证数据完整和准确性，已经通过审核的问卷不能再被编辑！'><font color=grey>编辑问卷</font></span>|<span title='为了保证数据完整和准确性，已经通过审核的问卷不能再被编辑！'><font color=grey>管理题目</font></span>":"<a href=SurveyEdit.jsp?sid="+survey.getSId()+ ">编辑问卷</a>|<a href=QuestionAdmin.jsp?sid="+survey.getSId()+">管理题目</a>" %>|<a href='javascript:DelSurvey(<%=survey.getSId() %>)'>删除</a></td>--%>

                <td>
                    <c:if test="${survey.ischeck==1}">
                        <img src='../admin/images/on.gif'>
                    </c:if>
                    <c:if test="${survey.ischeck==0}">
                        <img src='../admin/images/off.gif'>
                    </c:if>
                </td>
                <td>
                    <a href="${pageContext.request.contextPath}/SurveyShow?sid=${survey.id}" target="_blank">预览</a>|
                    <a href="/admin/survey/surveyEdit?sid=${survey.id}">编辑问卷</a>|
                    <%--SurveyEdit.jsp--%>
                    <a href=${pageContext.request.contextPath}/admin/question/questionManage?sid=${survey.id}>管理题目</a>|
                    <%--QuestionAdmin.jsp--%>
                    <a href='javascript:DelSurvey()'>删除</a>
                </td>
            </tr>
        </c:forEach>
    </tbody>
</table>
<div class="pull-right">
    <script type="text/javascript">
        function page(pageCode) {
            window.location.href = "${pageContext.request.contextPath}/surveyAdmin/list?pageCode=" + pageCode ;
        }
    </script>
    <jsp:include page="/page.jsp"></jsp:include>
</div>
</body>
</html>
